package com.ipoint.intr.smartCatalog.controller.template;

import java.util.List;

import javax.persistence.EntityManager;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

import com.ipoint.intr.smartCatalog.model.template.Template;

@Name("templateController")
@Scope(ScopeType.STATELESS)
public class TemplateController {

	@In
	private EntityManager entityManager;

	@SuppressWarnings("unchecked")
	public List<Template> list() {
		return entityManager.createQuery("select t from Template t")
				.getResultList();
	}
}
